package com.example.foodiemoments.ui.fragments

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.example.foodiemoments.databinding.FragmentPublishBinding

class PublishFragment : Fragment() {

    private var _binding: FragmentPublishBinding? = null
    private val binding get() = _binding!!

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        _binding = FragmentPublishBinding.inflate(inflater, container, false)
        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        setupViews()
    }

    private fun setupViews() {
        // 发布教程
        binding.btnPublishRecipe.setOnClickListener {
            // TODO: 跳转到发布教程页面
        }

        // 发布动态
        binding.btnPublishMoment.setOnClickListener {
            // TODO: 跳转到发布动态页面
        }
    }

    override fun onDestroyView() {
        super.onDestroyView()
        _binding = null
    }
}
